import axios from "@/axios"

//获取相关文档及资料
export function LoadDocument (data) {
  let { sortId, pageSize, currentPage } = data
  return axios.post(`/loadDocument/${sortId}/${pageSize}/${currentPage}`, {})
}

//删除当前行文档
export function DelDocument (data) {
  let { id } = data
  return axios.post(`/delDocument/${id}`, {})
}

//发布文档
export function ReleaseDocument (data) {
  let { sortId, documentIdList } = data
  return axios.post(`/releaseDocument/${sortId}`, documentIdList)
}

//控制文档位置
export function UpdateReorder (data) {
  return axios.post(`/updateReorder`, data, {
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}

//编辑文档
export function UpdateDocument (documentId, data) {
  return axios.post(`/updateDocument/${documentId}`, data, {
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}


